package com.zmm.study.mes.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zmm.study.mes.dao.SpTableManagerItemDao;
import com.zmm.study.mes.service.SpTableManagerItemService;
import com.zmm.study.mes.entity.basedata.SpTableManagerItem;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * description
 * name SpTableManagerItemServiceImpl
 *
 * @author Zebulon
 * @date by 2022-05-05 21:30:25
 */
@Service
public class SpTableManagerItemServiceImpl extends ServiceImpl<SpTableManagerItemDao, SpTableManagerItem> implements SpTableManagerItemService {


    @Autowired
    public SpTableManagerItemDao spTableManagerItemDao;

    /**
     * 根据主表ID 查询该表的明细
     *
     * @param tableNameId 关联主表ID
     * @return 表字段明细
     */
    @Override
    public List<SpTableManagerItem> queryItemBytableNameId(String tableNameId) {
        return spTableManagerItemDao.queryItemBytableNameId(tableNameId);
    }


    /**
     * 根据主表ID 删除明细
     *
     * @param tableNameId 关联主表ID
     */
    @Override
    public void deleteItemBytableNameId(String tableNameId) {
        spTableManagerItemDao.deleteItemBytableNameId(tableNameId);
    }
}
